package cn.gok.springsecuritydemo4.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: chen fan
 * @since: 2022/11/22 16:41
 * @description:
 */
@RestController
public class TestController {

    @RequestMapping("/user/findAll")
    public String getAllUser(){
        return "getAllUser";
    }

    @RequestMapping("/user/saveOrUpadate")
    public String updateOrSaveUser(){
        return "updateOrSaveUser";
    }

    @RequestMapping("/delete/{id}")
    public String deleteUser(@PathVariable("id") Integer id){
        return "deleteUser";
    }

    @RequestMapping("/user/{id}")
    public String getUserById(@PathVariable("id") Integer id){
        return "getUserById";
    }

    @RequestMapping("/product/findAll")
    public String findAllProduct(){
        return "findAllProduct";
    }
    @RequestMapping("/product/saveOrUpadate")
    public String saveOrUpadateProiduct(){
        return "saveOrUpadateProiduct";
    }


    @RequestMapping("/product/show/{id}/{isShow}")
    public String updateProductSatus(@PathVariable("id") Integer id,
                                     @PathVariable("isShow") int isShow){
        return "updateProductSatus";
    }

}
